package com.ybkj.o2o.zhuanche.conf;

import com.ybkj.o2o.zhuanche.thrift.ThriftService;

/**
 * Created by shine on 2016/12/6.
 */
public class ThriftServiceClient {

  private String workerId;

  private String thriftServer;

  private ThriftService.Client client;

  public String getWorkerId() {
    return workerId;
  }

  public void setWorkerId(String workerId) {
    this.workerId = workerId;
  }

  public String getThriftServer() {
    return thriftServer;
  }

  public void setThriftServer(String thriftServer) {
    this.thriftServer = thriftServer;
  }

  public ThriftService.Client getClient() {
    return client;
  }

  public void setClient(ThriftService.Client client) {
    this.client = client;
  }

  @Override
  public boolean equals(Object object) {
    if (this == object) {
      return true;
    }
    if (object == null || getClass() != object.getClass()) {
      return false;
    }

    ThriftServiceClient obj = (ThriftServiceClient) object;

    if (workerId != null ? !workerId.equals(obj.workerId) : obj.workerId != null) {
      return false;
    }
    return thriftServer != null ? thriftServer.equals(obj.thriftServer) : obj.thriftServer == null;
  }

  @Override
  public int hashCode() {
    int result = workerId != null ? workerId.hashCode() : 0;
    result = 31 * result + (thriftServer != null ? thriftServer.hashCode() : 0);
    return result;
  }
}
